# _*_coding : utf-8 _*_
# @Time : 2025/11/3 10:05
# @Author : Eavan
# @filename : config.py
from requests import delete

import cms_data.data
from cms_data.data import change_pwd_id, delete_user_ids, userStart_userId

user = cms_data.data.user  # 在data层拿到登录账号
pwd = cms_data.data.loginPwd1  # 在data层拿到登录密码

# 第二步：封装每个接口要用到的接口信息用于后面的发起请求，请求一般要用到headers(请求头)、data(接口入参)、url(接口地址)这三个信息

# ******** 登录接口信息 ********
# 1、登录接口url
login_url = 'http://localhost:8082/cms/manage/loginJump.do'

# 2、登录接口入参
login_data = {
    "userAccount": user,
    "loginPwd": pwd
}

# 3、登录接口请求头
login_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 查询用户接口信息 ********
startCreateDate = cms_data.data.startCreateDate
endCreateDate = cms_data.data.endCreateDate
searchValue = cms_data.data.searchValue
page1 = cms_data.data.page

queryUserList_url = 'http://localhost:8082/cms/manage/queryUserList.do'
queryUserList_data = {
	"startCreateDate": startCreateDate,
	"endCreateDate": endCreateDate,
	"searchValue": searchValue,
	"page": page1
}
queryUserList_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 添加用户接口信息 ********
add_user_id = cms_data.data.add_user_id
add_user_name = cms_data.data.add_user_Name
userSex = cms_data.data.userSex
userMobile = cms_data.data.userMobile
userEmail = cms_data.data.userEmail
user_Acc = cms_data.data.userAcc
login_Password = cms_data.data.login_Password
confirmPwd1 = cms_data.data.confirmPwd

addUser_url = 'http://localhost:8082/cms/manage/saveSysUser.do'
addUser_data = {
	"id": add_user_id,
	"userName": add_user_name,
	"userSex": userSex,
	"userMobile": userMobile,
	"userEmail": userEmail,
	"userAccount": user_Acc,
	"loginPwd": login_Password,
	"confirmPwd": confirmPwd1
}
addUser_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 用户修改密码接口信息 ********
changePwd_id = cms_data.data.change_pwd_id
changePwd_loginpwd = cms_data.data.change_pwd_loginPwd
changePwd_loginpwd2 = cms_data.data.change_pwd_loginPwd2
changePwd_url = 'http://localhost:8082/cms/manage/updateLoginPwd.do'
changePwd_data = {
	"id": change_pwd_id,
	"loginPwd": changePwd_loginpwd,
	"loginPwd2": changePwd_loginpwd2
}
changePwd_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 删除用户接口信息 ********
deleteUser_ids = cms_data.data.delete_user_ids
delete_user_url = 'http://localhost:8082/cms/manage/deleteByIds.do'
delete_user_data = {
	"ids": deleteUser_ids
}
delete_user_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 用户编辑接口信息 ********
editUser_id = cms_data.data.edit_user_id
editUser_name = cms_data.data.edit_user_userName
editUser_userSex = cms_data.data.edit_user_userSex
editUser_userMobile = cms_data.data.edit_user_userMobile
editUser_userEmail = cms_data.data.edit_user_userEmail
editUser_userAcc = cms_data.data.edit_user_userAcc
editUser_login_Password = cms_data.data.edit_user_loginpwd
editUser_confirmPwd1 = cms_data.data.edit_user_confirmPwd

edit_user_url = 'http://localhost:8082/cms/manage/saveSysUser.do'
edit_user_data ={
	"id": editUser_id,
	"userName": editUser_name,
	"userSex": editUser_userSex,
	"userMobile": editUser_userMobile,
	"userEmail": editUser_userEmail,
	"userAccount": editUser_userAcc,
	"loginPwd": editUser_login_Password,
	"confirmPwd": editUser_confirmPwd1
}
edit_user_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 用户停用接口信息 ********
userStop_userId = cms_data.data.userStop_userId
userStop_userStatus =cms_data.data.userStop_userStatus

user_stop_use_url = 'http://localhost:8082/cms/manage/updateUserStatus.do'
user_stop_use_data = {
	"userId": userStop_userId,
	"userStatus": userStop_userStatus
}
user_stop_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 用户启动接口信息 ********
userStart_userId1 = cms_data.data.userStart_userId
userStart_userStatus1 = cms_data.data.userStart_userStatus

userStart_url = 'http://localhost:8082/cms/manage/updateUserStatus.do'
userStart_data = {
	"userId": userStart_userId1,
	"userStatus": userStart_userStatus1
}
userStart_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 批量删除接口信息 ********
delete_more_ids1 = cms_data.data.delete_more_ids

delete_more_url = 'http://localhost:8082/cms/manage/deleteByIds.do'
delete_more_data = {
	"ids": delete_more_ids1
}
delete_more_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}

# ******** 退出登录接口信息 ********
mistake_user1 = cms_data.data.mistake_user
mistake_loginPwd1 = cms_data.data.mistake_loginPwd

login_mistake_url = 'http://localhost:8082/cms/manage/loginJump.do'
login_mistake_data = {
    "userAccount": mistake_user1,
    "loginPwd": mistake_loginPwd1
}
login_mistake_headers = {
    "content-type": "application/x-www-form-urlencoded",
    "charset": "UTF-8"
}